#ifndef _IMAGE_U32_H
#define _IMAGE_U32_H

#include <stdint.h>

typedef struct image_u32 image_u32_t;
struct image_u32
{
    int width, height;
    int stride;

    uint32_t *buf;
};

#include "image_f32.h"

image_u32_t *image_u32_create(int width, int height);
image_u32_t *image_u32_create_from_pnm(const char *path);
void image_u32_destroy(image_u32_t *im);

// Fills u32 image from four float images, with byte order v = a << 24 | b << 16 | c << 8 | d
void image_u32_fill_from_f32(image_u32_t *t, const image_f32_t *a, const image_f32_t *b, const image_f32_t *c, const image_f32_t *d);


int image_u32_write_pnm(const image_u32_t *im, const char *path);

#endif
